using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Model;
using System.Collections;

namespace Dao
{
    public  class Permit_MenuDM
    {
        ///读取菜单
        public DataTable Get_MenuBM()
        {
            return DB.MySqlDbSqlSugar.Queryable<Permit_Menu>().ToDataTable();
        }

        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="page">第几页</param>
        /// <param name="limit">每页数据量</param>
        /// <param name="count">总数</param>
        /// <returns></returns>
        public List<MenuList> GetListMenu(int page, int limit, ref int count)
        {
            return DB.MySqlDbSqlSugar.Queryable<MenuList>().OrderBy(it => it.id).ToPageList(page, limit, ref count);
        }
    }
}
